package com.cby.jetpack.sample.binding

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import com.cby.jetpack.sample.R
import com.cby.jetpack.sample.binding.data.Progress
import com.cby.jetpack.sample.databinding.ActivityDataBindTwoWayBinding

/**
 * @description: TestDataBindTwoWayActivity
 *
 * @author ChenBaoyang
 * @date 8/10/21 17:12
 */
class TestDataBindTwoWayActivity : AppCompatActivity() {

    //private val binding: ActivityDataBindTwoWayBinding by dataBinding(R.layout.activity_data_bind_two_way)
    private lateinit var  binding: ActivityDataBindTwoWayBinding
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = DataBindingUtil.setContentView(this, R.layout.activity_data_bind_two_way)
        val progress = Progress()
        progress.progress.set(10)
        binding.progress = progress
    }
}